﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace SJ.Platform.TransferTool.DBmodels;

public partial class SjdbContext : DbContext
{
    public SjdbContext()
    {
    }

    public SjdbContext(DbContextOptions<SjdbContext> options)
        : base(options)
    {
    }

    public virtual DbSet<ApproveMain> ApproveMains { get; set; }

    public virtual DbSet<ApproveRecord> ApproveRecords { get; set; }

    public virtual DbSet<FlowMain> FlowMains { get; set; }

    public virtual DbSet<FlowNode> FlowNodes { get; set; }

    public virtual DbSet<FlowNodeApproveuser> FlowNodeApproveusers { get; set; }

    public virtual DbSet<FlowType> FlowTypes { get; set; }

    public virtual DbSet<ProjectChangeInfo> ProjectChangeInfos { get; set; }

    public virtual DbSet<ProjectChangeMain> ProjectChangeMains { get; set; }

    public virtual DbSet<ProjectDocument> ProjectDocuments { get; set; }

    public virtual DbSet<ProjectMain> ProjectMains { get; set; }

    public virtual DbSet<ProjectRequirementFeature> ProjectRequirementFeatures { get; set; }

    public virtual DbSet<ProjectRequirementFeatureChange> ProjectRequirementFeatureChanges { get; set; }

    public virtual DbSet<ProjectRequirementInfo> ProjectRequirementInfos { get; set; }

    public virtual DbSet<ProjectRequirementInfoChange> ProjectRequirementInfoChanges { get; set; }

    public virtual DbSet<ProjectRequirementMain> ProjectRequirementMains { get; set; }

    public virtual DbSet<ProjectScheduleMain> ProjectScheduleMains { get; set; }

    public virtual DbSet<ProjectSchedulePerson> ProjectSchedulePeople { get; set; }

    public virtual DbSet<ProjectScheduleTask> ProjectScheduleTasks { get; set; }

    public virtual DbSet<ProjectScheduleTaskChange> ProjectScheduleTaskChanges { get; set; }

    public virtual DbSet<ProjectScheduleTaskDo> ProjectScheduleTaskDos { get; set; }

    public virtual DbSet<ProjectSetting> ProjectSettings { get; set; }

    public virtual DbSet<ProjectStakeholder> ProjectStakeholders { get; set; }

    public virtual DbSet<ProjectTeamMain> ProjectTeamMains { get; set; }

    public virtual DbSet<ProjectTeamMember> ProjectTeamMembers { get; set; }

    public virtual DbSet<ProjectTeamMemberChange> ProjectTeamMemberChanges { get; set; }

    public virtual DbSet<SysAuthority> SysAuthorities { get; set; }

    public virtual DbSet<SysLog> SysLogs { get; set; }

    public virtual DbSet<SysLogin> SysLogins { get; set; }

    public virtual DbSet<SysMenu> SysMenus { get; set; }

    public virtual DbSet<SysOrg> SysOrgs { get; set; }

    public virtual DbSet<SysRAuthoritytorole> SysRAuthoritytoroles { get; set; }

    public virtual DbSet<SysRForeigntorole> SysRForeigntoroles { get; set; }

    public virtual DbSet<SysRUserandorg> SysRUserandorgs { get; set; }

    public virtual DbSet<SysRole> SysRoles { get; set; }

    public virtual DbSet<SysUser> SysUsers { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
        => optionsBuilder.UseMySql("server=localhost;port=3306;database=sjdb;uid=root;pwd=lyq126430", Microsoft.EntityFrameworkCore.ServerVersion.Parse("8.4.0-mysql"));

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder
            .UseCollation("utf8mb4_0900_ai_ci")
            .HasCharSet("utf8mb4");

        modelBuilder.Entity<ApproveMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("approve_main", tb => tb.HasComment("审批主表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment(" 主键");
            entity.Property(e => e.ApproveName)
                .HasMaxLength(128)
                .HasComment("审批流程名称");
            entity.Property(e => e.Fid)
                .HasMaxLength(128)
                .HasComment("外部Id，如：项目等")
                .HasColumnName("FId");
            entity.Property(e => e.FlowId)
                .HasMaxLength(128)
                .HasComment("流程ID");
            entity.Property(e => e.FlowTypeId)
                .HasMaxLength(128)
                .HasComment("流程类型ID");
            entity.Property(e => e.FlowTypeName)
                .HasMaxLength(128)
                .HasComment("流程类型名称");
            entity.Property(e => e.Status).HasComment("状态");
            entity.Property(e => e.SubmitTime)
                .HasComment("发起时间")
                .HasColumnType("datetime");
            entity.Property(e => e.SubmitUserId)
                .HasMaxLength(128)
                .HasComment("发起人ID");
            entity.Property(e => e.SubmitUserName)
                .HasMaxLength(128)
                .HasComment("发起人姓名");
        });

        modelBuilder.Entity<ApproveRecord>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("approve_record", tb => tb.HasComment("审批记录表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.ApproveOpinion)
                .HasComment("审批意见")
                .HasColumnType("text");
            entity.Property(e => e.ApproveResult).HasComment("审批结果（1=同意，2=不同意）");
            entity.Property(e => e.ApproveTime)
                .HasComment("审批时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ApproveUserId)
                .HasMaxLength(128)
                .HasComment("审批人ID");
            entity.Property(e => e.ApproveUserName)
                .HasMaxLength(128)
                .HasComment("审批人姓名");
            entity.Property(e => e.CreateTime)
                .HasComment("添加时间 ")
                .HasColumnType("datetime");
            entity.Property(e => e.FlowId)
                .HasMaxLength(128)
                .HasComment("审批流程ID");
            entity.Property(e => e.IsCheck).HasComment("是否审核（1=审核，0=未审核）");
            entity.Property(e => e.NodeId)
                .HasMaxLength(128)
                .HasComment("审批流程节点ID");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("主流程ID")
                .HasColumnName("PId");
        });

        modelBuilder.Entity<FlowMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("flow_main", tb => tb.HasComment("流程主表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人");
            entity.Property(e => e.FlowName)
                .HasMaxLength(128)
                .HasComment("流程名称");
            entity.Property(e => e.FlowTypeId)
                .HasMaxLength(128)
                .HasComment("流程类型ID");
            entity.Property(e => e.FlowTypeName)
                .HasMaxLength(128)
                .HasComment("流程类型名称");
            entity.Property(e => e.IsUsed).HasComment("是否启用");
        });

        modelBuilder.Entity<FlowNode>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("flow_node", tb => tb.HasComment("流程节点"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.ApproveRoleId)
                .HasMaxLength(128)
                .HasComment("审批角色ID");
            entity.Property(e => e.ApproveRoleName)
                .HasMaxLength(128)
                .HasComment("审批角色名称");
            entity.Property(e => e.ApproveType).HasComment("审批类型（1=专人审批，2=角色审批，3=直属上级审批，4=其他）");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人");
            entity.Property(e => e.Fid)
                .HasMaxLength(128)
                .HasComment("流程ＩＤ");
            entity.Property(e => e.NodeName)
                .HasMaxLength(128)
                .HasComment("节点名称");
            entity.Property(e => e.PassCondition).HasComment("通过条件（0=所有人通过才算审批完成，1=有一人审批通过即可）");
            entity.Property(e => e.PrevNodeId)
                .HasMaxLength(128)
                .HasComment("前一个节点ID");
            entity.Property(e => e.PrevNodeName)
                .HasMaxLength(128)
                .HasComment("前一个节点名称");
            entity.Property(e => e.Sort).HasComment("节点顺序");
        });

        modelBuilder.Entity<FlowNodeApproveuser>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("flow_node_approveuser", tb => tb.HasComment("专人审批节点的审批人"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.ApproveUserId)
                .HasMaxLength(128)
                .HasComment("审批人ID");
            entity.Property(e => e.ApproveUserName)
                .HasMaxLength(128)
                .HasComment("审批人姓名");
            entity.Property(e => e.NodeId)
                .HasMaxLength(128)
                .HasComment("节点ID");
        });

        modelBuilder.Entity<FlowType>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("flow_type", tb => tb.HasComment("流程类型"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级类型ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(128)
                .HasComment("父级名称")
                .HasColumnName("PName");
            entity.Property(e => e.TypeName)
                .HasMaxLength(128)
                .HasComment("类型名称");
        });

        modelBuilder.Entity<ProjectChangeInfo>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_change_info", tb => tb.HasComment("项目变更内容"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.ChangeType).HasComment("变更类型（1=新增，2=修正，3=删除）");
            entity.Property(e => e.Content)
                .HasComment("变更内容")
                .HasColumnType("text");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间（进度变更）")
                .HasColumnType("datetime");
            entity.Property(e => e.MemberId)
                .HasMaxLength(128)
                .HasComment("团队成员记录ID");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主记录ID")
                .HasColumnName("MId");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Rid)
                .HasMaxLength(128)
                .HasComment("需求ID")
                .HasColumnName("RId");
            entity.Property(e => e.Rname)
                .HasMaxLength(255)
                .HasComment("需求名称")
                .HasColumnName("RName");
            entity.Property(e => e.Sid)
                .HasMaxLength(128)
                .HasComment("进度ID")
                .HasColumnName("SId");
            entity.Property(e => e.Sname)
                .HasMaxLength(255)
                .HasComment("进度计划名称")
                .HasColumnName("SName");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间（进度变更）")
                .HasColumnType("datetime");
        });

        modelBuilder.Entity<ProjectChangeMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_change_main", tb => tb.HasComment("项目变更主表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.ChangeName)
                .HasMaxLength(255)
                .HasComment("变更名称");
            entity.Property(e => e.ChangeType).HasComment("变更类型（1=需求变更，2=进度变更...）");
            entity.Property(e => e.CreateTime)
                .HasComment("发起时间")
                .HasColumnType("datetime");
            entity.Property(e => e.CreateUserId)
                .HasMaxLength(128)
                .HasComment("发起人ID");
            entity.Property(e => e.CreateUserName)
                .HasMaxLength(128)
                .HasComment("发起人姓名");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Reason)
                .HasComment("变更原因")
                .HasColumnType("text");
            entity.Property(e => e.Status).HasComment("状态");
        });

        modelBuilder.Entity<ProjectDocument>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_document", tb => tb.HasComment("项目文档"));

            entity.Property(e => e.Id).HasComment("id");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.DocType).HasComment("文档类型（1=立项文档，2=需求文档，3=设计文档，4=开发文档，5=进度文档）");
            entity.Property(e => e.EditTime)
                .HasComment("最后编辑时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后编辑人ID");
            entity.Property(e => e.FileName)
                .HasMaxLength(255)
                .HasComment("文件名称");
            entity.Property(e => e.IsUsed).HasComment("是否生效");
            entity.Property(e => e.ObjectId)
                .HasMaxLength(128)
                .HasComment("mongodb存储返回的id");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Version)
                .HasMaxLength(64)
                .HasComment("版本号");
        });

        modelBuilder.Entity<ProjectMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_main", tb => tb.HasComment("项目主表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("创建时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("创建人");
            entity.Property(e => e.Basis)
                .HasComment("项目依据")
                .HasColumnType("text");
            entity.Property(e => e.Description)
                .HasComment("项目描述")
                .HasColumnType("text");
            entity.Property(e => e.EditTime)
                .HasComment("最后编辑时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后编辑人");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ManagerId)
                .HasMaxLength(128)
                .HasComment("项目经理Id");
            entity.Property(e => e.ManagerName)
                .HasMaxLength(128)
                .HasComment("项目经理名称");
            entity.Property(e => e.ProjectName)
                .HasMaxLength(255)
                .HasComment("项目名称");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status)
                .HasDefaultValueSql("'0'")
                .HasComment("项目状态（0=立项中，1=立项完成）");
        });

        modelBuilder.Entity<ProjectRequirementFeature>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_requirement_feature", tb => tb.HasComment("项目需求功能"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.Columns)
                .HasComment("列表字段")
                .HasColumnType("text");
            entity.Property(e => e.Mark)
                .HasComment("功能描述")
                .HasColumnType("text");
            entity.Property(e => e.Parameters)
                .HasComment("接口参数")
                .HasColumnType("text");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级功能ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(255)
                .HasComment("父级功能标题")
                .HasColumnName("PName");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Rid)
                .HasMaxLength(128)
                .HasComment("需求ID")
                .HasColumnName("RId");
            entity.Property(e => e.Rname)
                .HasMaxLength(255)
                .HasComment("需求标题")
                .HasColumnName("RName");
            entity.Property(e => e.Rvalue)
                .HasComment("返回值")
                .HasColumnType("text")
                .HasColumnName("RValue");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.Title)
                .HasMaxLength(255)
                .HasComment("功能标题");
            entity.Property(e => e.Type).HasComment("功能类型");
        });

        modelBuilder.Entity<ProjectRequirementFeatureChange>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_requirement_feature_change", tb => tb.HasComment("项目需求功能"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.ChangeTime)
                .HasComment("变更时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ChangeUserId)
                .HasMaxLength(128)
                .HasComment("变更人ID");
            entity.Property(e => e.Columns)
                .HasComment("列表字段")
                .HasColumnType("text");
            entity.Property(e => e.Mark)
                .HasComment("功能描述")
                .HasColumnType("text");
            entity.Property(e => e.OldId)
                .HasMaxLength(128)
                .HasComment("原功能ID");
            entity.Property(e => e.Parameters)
                .HasComment("接口参数")
                .HasColumnType("text");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级功能ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(255)
                .HasComment("父级功能标题")
                .HasColumnName("PName");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Rid)
                .HasMaxLength(128)
                .HasComment("需求ID")
                .HasColumnName("RId");
            entity.Property(e => e.Rname)
                .HasMaxLength(255)
                .HasComment("需求标题")
                .HasColumnName("RName");
            entity.Property(e => e.Rvalue)
                .HasComment("返回值")
                .HasColumnType("text")
                .HasColumnName("RValue");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.Title)
                .HasMaxLength(255)
                .HasComment("功能标题");
            entity.Property(e => e.Type).HasComment("功能类型");
        });

        modelBuilder.Entity<ProjectRequirementInfo>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_requirement_info", tb => tb.HasComment("项目需求细则"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主ID")
                .HasColumnName("MId");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(255)
                .HasComment("父级标题")
                .HasColumnName("PName");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.Title)
                .HasMaxLength(255)
                .HasComment("标题");
        });

        modelBuilder.Entity<ProjectRequirementInfoChange>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_requirement_info_change", tb => tb.HasComment("项目需求细则"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.ChangeTime)
                .HasComment("变更时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ChangeUserId)
                .HasMaxLength(128)
                .HasComment("变更人ID");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主ID")
                .HasColumnName("MId");
            entity.Property(e => e.OldId)
                .HasMaxLength(128)
                .HasComment("原需求ID");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(255)
                .HasComment("父级标题")
                .HasColumnName("PName");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.Title)
                .HasMaxLength(255)
                .HasComment("标题");
        });

        modelBuilder.Entity<ProjectRequirementMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_requirement_main", tb => tb.HasComment("项目需求主表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Status).HasComment("状态");
        });

        modelBuilder.Entity<ProjectScheduleMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_schedule_main", tb => tb.HasComment("项目进度计划主表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment(" 主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Progress)
                .HasPrecision(18, 2)
                .HasComment("进度");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.ScheduleName)
                .HasMaxLength(128)
                .HasComment("计划名称");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status).HasComment("状态");
        });

        modelBuilder.Entity<ProjectSchedulePerson>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_schedule_person", tb => tb.HasComment("项目进度任务负责人"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主计划ID")
                .HasColumnName("MId");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.TaskId)
                .HasMaxLength(128)
                .HasComment("任务ID");
            entity.Property(e => e.UserId)
                .HasMaxLength(128)
                .HasComment("负责人ID");
            entity.Property(e => e.UserName)
                .HasMaxLength(128)
                .HasComment("负责人姓名");
        });

        modelBuilder.Entity<ProjectScheduleTask>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_schedule_task", tb => tb.HasComment("项目进度计划明细"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Fid)
                .HasMaxLength(128)
                .HasComment("功能ID")
                .HasColumnName("FId");
            entity.Property(e => e.Ftitle)
                .HasMaxLength(255)
                .HasComment("功能标题")
                .HasColumnName("FTitle");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主计划ID")
                .HasColumnName("MId");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(255)
                .HasComment("父级名称")
                .HasColumnName("PName");
            entity.Property(e => e.Progress)
                .HasPrecision(18, 2)
                .HasComment("进度情况");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Rid)
                .HasMaxLength(128)
                .HasComment("需求ID")
                .HasColumnName("RId");
            entity.Property(e => e.Rname)
                .HasMaxLength(255)
                .HasComment("需求名称")
                .HasColumnName("RName");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.TaskName)
                .HasMaxLength(255)
                .HasComment("任务名称");
        });

        modelBuilder.Entity<ProjectScheduleTaskChange>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_schedule_task_change", tb => tb.HasComment("项目进度计划明细"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.ChangeTime)
                .HasComment("变更时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ChangeUserId)
                .HasMaxLength(128)
                .HasComment("变更人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Fid)
                .HasMaxLength(128)
                .HasComment("功能ID")
                .HasColumnName("FId");
            entity.Property(e => e.Ftitle)
                .HasMaxLength(255)
                .HasComment("功能标题")
                .HasColumnName("FTitle");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主计划ID")
                .HasColumnName("MId");
            entity.Property(e => e.OldId)
                .HasMaxLength(128)
                .HasComment("原进度ID");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID")
                .HasColumnName("PId");
            entity.Property(e => e.Pname)
                .HasMaxLength(255)
                .HasComment("父级名称")
                .HasColumnName("PName");
            entity.Property(e => e.Progress)
                .HasPrecision(18, 2)
                .HasComment("进度情况");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.Rid)
                .HasMaxLength(128)
                .HasComment("需求ID")
                .HasColumnName("RId");
            entity.Property(e => e.Rname)
                .HasMaxLength(255)
                .HasComment("需求名称")
                .HasColumnName("RName");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.TaskName)
                .HasMaxLength(255)
                .HasComment("任务名称");
        });

        modelBuilder.Entity<ProjectScheduleTaskDo>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_schedule_task_do", tb => tb.HasComment("任务完成记录"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.Mark)
                .HasComment("备注")
                .HasColumnType("text");
            entity.Property(e => e.Progress)
                .HasPrecision(18, 2)
                .HasComment("填报进度");
            entity.Property(e => e.TaskId)
                .HasMaxLength(128)
                .HasComment("任务ID");
        });

        modelBuilder.Entity<ProjectSetting>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_setting", tb => tb.HasComment("项目设置表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.Skey).HasComment("key");
            entity.Property(e => e.Stype)
                .HasMaxLength(128)
                .HasComment("类型（状态、等）");
            entity.Property(e => e.Svalue)
                .HasMaxLength(128)
                .HasComment("value");
        });

        modelBuilder.Entity<ProjectStakeholder>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_stakeholder", tb => tb.HasComment("项目干系人"));

            entity.Property(e => e.Id).HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.RealName)
                .HasMaxLength(128)
                .HasComment("干系人姓名");
            entity.Property(e => e.StakeholderType).HasComment("干系人类型（1=发起人，2=团队成员，3=其他）");
            entity.Property(e => e.UserId)
                .HasMaxLength(128)
                .HasComment("干系人ID");
        });

        modelBuilder.Entity<ProjectTeamMain>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_team_main", tb => tb.HasComment("项目团队资源日历"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment(" 主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EndTime)
                .HasComment("结束时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.StartTime)
                .HasComment("开始时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Status).HasComment("状态");
            entity.Property(e => e.TeamName)
                .HasMaxLength(128)
                .HasComment("团队资源日历名称");
        });

        modelBuilder.Entity<ProjectTeamMember>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_team_member", tb => tb.HasComment("团队资源详情"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EntryTime)
                .HasComment("进入时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ExitTime)
                .HasComment("退出时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主记录ID")
                .HasColumnName("MId");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.UserId)
                .HasMaxLength(128)
                .HasComment("用户ID");
            entity.Property(e => e.UserName)
                .HasMaxLength(128)
                .HasComment("用户姓名");
        });

        modelBuilder.Entity<ProjectTeamMemberChange>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("project_team_member_change", tb => tb.HasComment("团队资源详情"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人ID");
            entity.Property(e => e.ChangeTime)
                .HasComment("变更时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ChangeUserId)
                .HasMaxLength(128)
                .HasComment("变更人ID");
            entity.Property(e => e.EditTime)
                .HasComment("最后修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("最后修改人ID");
            entity.Property(e => e.EntryTime)
                .HasComment("进入时间")
                .HasColumnType("datetime");
            entity.Property(e => e.ExitTime)
                .HasComment("退出时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Mark)
                .HasComment("描述")
                .HasColumnType("text");
            entity.Property(e => e.Mid)
                .HasMaxLength(128)
                .HasComment("主记录ID")
                .HasColumnName("MId");
            entity.Property(e => e.OldId)
                .HasMaxLength(128)
                .HasComment("原ID");
            entity.Property(e => e.ProjectId)
                .HasMaxLength(128)
                .HasComment("项目ID");
            entity.Property(e => e.UserId)
                .HasMaxLength(128)
                .HasComment("用户ID");
            entity.Property(e => e.UserName)
                .HasMaxLength(128)
                .HasComment("用户姓名");
        });

        modelBuilder.Entity<SysAuthority>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_authority", tb => tb.HasComment("系统权限"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.AuthorityName)
                .HasMaxLength(128)
                .HasComment("权限名称");
            entity.Property(e => e.AuthorityType).HasComment("权限类型（1=菜单，2=按钮）");
            entity.Property(e => e.EditTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("修改人");
            entity.Property(e => e.MenuId)
                .HasMaxLength(128)
                .HasComment("菜单ID");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID")
                .HasColumnName("PId");
        });

        modelBuilder.Entity<SysLog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_log", tb => tb.HasComment("系统日志"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.ActionName)
                .HasMaxLength(128)
                .HasComment("操作方法");
            entity.Property(e => e.ActionStatus)
                .HasMaxLength(64)
                .HasComment("操作状态");
            entity.Property(e => e.AddTime)
                .HasComment("操作时间")
                .HasColumnType("datetime");
            entity.Property(e => e.Details)
                .HasComment("参数等信息")
                .HasColumnType("text");
            entity.Property(e => e.Ip)
                .HasMaxLength(128)
                .HasComment("IP地址")
                .HasColumnName("IP");
            entity.Property(e => e.UserId)
                .HasMaxLength(128)
                .HasComment("操作用户");
        });

        modelBuilder.Entity<SysLogin>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_login", tb => tb.HasComment("登陆账号"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.IsUsed)
                .HasDefaultValueSql("'1'")
                .HasComment("是否启用");
            entity.Property(e => e.LoginName)
                .HasMaxLength(128)
                .HasComment("登陆账号");
            entity.Property(e => e.Password)
                .HasMaxLength(128)
                .HasComment("密码");
        });

        modelBuilder.Entity<SysMenu>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_menu", tb => tb.HasComment("系统菜单"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.EditTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("修改人");
            entity.Property(e => e.MenuName)
                .HasMaxLength(128)
                .HasComment("菜单名称");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID")
                .HasColumnName("PId");
            entity.Property(e => e.Sort).HasComment("排序");
            entity.Property(e => e.Url)
                .HasMaxLength(128)
                .HasComment("页面地址");
        });

        modelBuilder.Entity<SysOrg>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_org", tb => tb.HasComment("系统组织机构"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.EditTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("修改人");
            entity.Property(e => e.Mark)
                .HasMaxLength(128)
                .HasComment("描述");
            entity.Property(e => e.OrgName)
                .HasMaxLength(128)
                .HasComment("组织机构名称");
            entity.Property(e => e.OrgType).HasComment("组织类型：1=公司，2=部门");
            entity.Property(e => e.Pid)
                .HasMaxLength(128)
                .HasComment("父级ID\n")
                .HasColumnName("PId");
        });

        modelBuilder.Entity<SysRAuthoritytorole>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_r_authoritytorole", tb => tb.HasComment("角色权限关系表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.AuthorityId)
                .HasMaxLength(128)
                .HasComment("权限ID");
            entity.Property(e => e.RoleId)
                .HasMaxLength(128)
                .HasComment("角色ID");
        });

        modelBuilder.Entity<SysRForeigntorole>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_r_foreigntorole", tb => tb.HasComment("角色关系表"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.ForeignId)
                .HasMaxLength(128)
                .HasComment("外部ID，需要绑定角色的对象的ID");
            entity.Property(e => e.ForeignType).HasComment("外部ID类型，1=用户，2=组织机构");
            entity.Property(e => e.RoleId)
                .HasMaxLength(128)
                .HasComment("角色ID");
        });

        modelBuilder.Entity<SysRUserandorg>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_r_userandorg", tb => tb.HasComment("用户历史组织机构关系"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.OrgId)
                .HasMaxLength(128)
                .HasComment("组织机构ID");
            entity.Property(e => e.UserId)
                .HasMaxLength(128)
                .HasComment("用户ID");
        });

        modelBuilder.Entity<SysRole>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_role", tb => tb.HasComment("系统角色"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("主键");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.EditTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("修改人");
            entity.Property(e => e.RoleName)
                .HasMaxLength(128)
                .HasComment("角色名称");
        });

        modelBuilder.Entity<SysUser>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity.ToTable("sys_user", tb => tb.HasComment("系统用户"));

            entity.Property(e => e.Id)
                .HasMaxLength(128)
                .HasComment("用户ID");
            entity.Property(e => e.AddTime)
                .HasComment("添加时间")
                .HasColumnType("datetime");
            entity.Property(e => e.AddUserId)
                .HasMaxLength(128)
                .HasComment("添加人");
            entity.Property(e => e.Birthday)
                .HasComment("出生日期")
                .HasColumnType("datetime");
            entity.Property(e => e.EditTime)
                .HasComment("修改时间")
                .HasColumnType("datetime");
            entity.Property(e => e.EditUserId)
                .HasMaxLength(128)
                .HasComment("修改人");
            entity.Property(e => e.IsUsed)
                .HasDefaultValueSql("'1'")
                .HasComment("是否启用1=启用，0=不启用");
            entity.Property(e => e.OrgId)
                .HasMaxLength(128)
                .HasComment("用户当前组织机构ID");
            entity.Property(e => e.OrgName)
                .HasMaxLength(128)
                .HasComment("用户当前组织机构名称");
            entity.Property(e => e.RealName)
                .HasMaxLength(128)
                .HasComment("真实姓名");
            entity.Property(e => e.Sex)
                .HasDefaultValueSql("'1'")
                .HasComment("性别1=男，2=女");
        });

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
